const conn = require('../data/conn');
const fs = require('fs');

module.exports.hezuo = (req, res) => {
    res.render('./jjh/hezuo');
}

// module.exports.hezuoFind = (req, res) => {
//     res.json({
//         code: '1202',
//         message: '登录成功'
//     })
// }

module.exports.postAddUpload = (req, res) => {
    // console.log(req.file);
    fs.writeFile('./public/upload/' + req.file.originalname, req.file.buffer, (error) => {
      if (error) return console.log(error);
  
      res.json({
        picAddr: './upload/' + req.file.originalname
      })
    })
  }